package com.caizi.base.http;

import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
/*
 * @author 菜菜籽
 * @date 2025/2/16 08:58
 * @description: 向其他服务器发起http请求
 */

@Component
public class Http {
    private  String baseUrl;
    private final RestTemplate restTemplate;

    public Http() {
        this.restTemplate = new RestTemplate();
    }

    public void setBaseUrl(String url) {
        this.baseUrl = url;
    }

    protected RestTemplate getRestTemplate() {
        return restTemplate;
    }

    protected String getBaseUrl() {
        return baseUrl;
    }
}
